<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/6/28
  Time: 16:44
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html >
<head>
    <title>Title</title>
    <!--引入layui样式文件-->
    <link rel="stylesheet" href="layui/css/layui.css">
</head>
<body>

<div class="layui-form-item">
    <label class="layui-form-label">房间号</label>
    <div class="layui-input-block">
        <input type="text" id="roomNum"   class="layui-input" disabled="disabled"
               style="width: 200px;">
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label">类型</label>
    <div class="layui-input-block">
        <input type="text" id="type"   class="layui-input"
               style="width: 200px;">
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label">状态</label>
    <div class="layui-input-block">
        <input type="text" id="state"   class="layui-input" value="1"
               style="width: 200px;">
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label">楼层</label>
    <div class="layui-input-block">
        <input type="text" id="floorNum"   class="layui-input"
               style="width: 200px;" >
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label">房间价格</label>
    <div class="layui-input-block">
        <input type="text" id="roomPrice"   class="layui-input"
               style="width: 200px;" >
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label">折后价</label>
    <div class="layui-input-block">
        <input type="text" id="discountPrice"   class="layui-input"
               style="width: 200px;">
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label">普通会员价</label>
    <div class="layui-input-block">
        <input type="text" id="omPrice"   class="layui-input"
               style="width: 200px;">
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label">vip会员价</label>
    <div class="layui-input-block">
        <input type="text" id="vipPrice"   class="layui-input"
               style="width: 200px;" >
    </div>
</div>
<button class="layui-btn layui-btn-normal"
        style="margin-left: 200px;" onclick="save()">保存</button>
</body>
<script src="layui/layui.js"></script>

<script>
    var $;
    layui.use(['jquery'],function(){
        $ = layui.jquery;

    });

    function save(){
        var index = parent.layer.getFrameIndex(window.name);
        window.parent.updateRoom($("#roomNum").val(),$("#type").val(),$("#state").val(),$("#floorNum").val(),$("#roomPrice").val(),$("#discountPrice").val(),$("#omPrice").val(),$("#vipPrice").val());
        parent.layer.close(index);
    }
</script>
</html>